package com.lsfb.signln.Utils;

import android.content.Context;
import android.telephony.TelephonyManager;
import android.util.Log;

/**
 * Created by Administrator on 2017/10/16 0016.
 */

public class DeviceUtil {
    private Context context;

    public DeviceUtil(Context context) {
        this.context = context;
    }

    /**
     * 获取设备ID
     * @return
     */
    public String getDeviceId() {
        TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
        String device_id = tm.getDeviceId();
        Log.e("Login", "设备id：" + device_id);
        return device_id;
    }

    /**
     * 获取手机品牌
     *
     * @return
     */
    public static String getPhoneBrand() {
        return android.os.Build.BRAND;
    }

    /**
     * 获取手机型号
     *
     * @return
     */
    public static String getPhoneModel() {
        return android.os.Build.MODEL;
    }
}
